zifu = input("请输入一行字符:")

letters = 0
space = 0
digit = 0
others = 0
print("统计结果：")
for i in zifu:
    if i>='a'and i<='z' or i>='A' and i<='Z': 
        letters += 1
    elif i == ' ':
        space += 1
    elif i in '0123456789':
        digit += 1
    else:
        others += 1
print("其中英文字母的个数为:"+str(letters))
print("其中空格的个数为:"+str(space))
print("其中数字的个数为:"+str(digit))
print("其中其他字符的个数为:"+str(others))

